class iGameProjectile extends MobileProjectile
	hidecategories(Movement, Display, Attachment, Collision, Physics, Advanced, Debug, Object)
	ClassGroup(iGame)
	placeable;

simulated function ProcessTouch(Actor Other, Vector HitLocation, Vector HitNormal)
{
	if( ActorsToIgnoreWhenHit.Find(Other.Class) != INDEX_NONE )
	{
		// The hit actor is one that should be ignored
		return;
	}

	//`log("--------------------------- HIT AT = "$HitLocation);

	if (DamageRadius > 0.0)
	{
		Explode(HitLocation, HitNormal);
	}
	else
	{
		Hit(Other, HitLocation, HitNormal);	
	}
}

simulated function Hit(Actor Other, vector HitLocation, vector HitNormal)
{
	MakeNoise(0.5);
	SpawnExplosionEffects(HitLocation, HitNormal);
	Other.TakeDamage(Damage,InstigatorController,HitLocation,MomentumTransfer * Normal(Velocity), MyDamageType,, self);
	Shutdown();
}

/**
 * Explode this Projectile
 */
simulated function Explode(vector HitLocation, vector HitNormal)
{
	if (Damage>0 && DamageRadius>0)
	{
		if ( Role == ROLE_Authority )
			MakeNoise(1.0);
		if ( !bShuttingDown )
		{
			ProjectileHurtRadius(HitLocation, HitNormal);
		}
	}
	else 
	{
		PlaySound(ImpactSound);
	}

	SpawnExplosionEffects(HitLocation, HitNormal);

	ShutDown();
}

defaultproperties
{
	bBlockedByInstigator = FALSE
}

